﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Extentions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;

namespace TrainingReminderSystem.ApiControllers
{
    /// <summary>
    /// weiapi 随便写的2
    /// </summary>
    //[Route("api/{controller}/{action}/{id?}")]
    [ApiController]
    [EnableCors("any")]
    public class Public2Controller : BaseControllerBase
    {
        /// <summary>
        /// Get1方法2
        /// </summary>
        /// <param name="id">参数ID</param>
        /// <returns></returns>
        [Route("api/Public2/Get/{id?}")]
        [AllowAnonymous]
        [HttpGet]
        public string Get(int? id)
        {
            return id == null ? "空" : id.ToString();
        }
    }
}
